import 'package:flutter/material.dart';
import 'package:test_flutter/constant/resources.dart';
import 'package:test_flutter/model/response/service_model.dart';
import 'package:test_flutter/utils/common_utils/CustomLocalizations.dart';
import 'package:test_flutter/utils/factory/Fit.dart';

class DryingHero extends StatelessWidget {
  final int position;
  final ServiceModel bean;

  DryingHero(this.position, this.bean);

  @override
  Widget build(BuildContext context) {
    return new Hero(
      tag: 'ppp$position',
      child: SizedBox(
        child: new Container(
          padding: EdgeInsets.only(left: Fit.scaleX(30)),
          width: MediaQuery.of(context).size.width,
          height: Fit.scaleY(400),
          decoration: BoxDecoration(
            gradient: LinearGradient(colors: [Color(0xFF18D48B), Color(0xFFFFF68F)]),
            borderRadius: BorderRadius.circular(Fit.scaleX(15)),
          ),
          child: Row(
            children: <Widget>[
              Container(
                width: Fit.scaleX(300),
                height: Fit.scaleY(400),
                child: Center(
                  child: new CircleAvatar(
                    backgroundColor: Colors.transparent,
                    backgroundImage: AssetImage('images/dry.png'),
                    radius: Fit.scaleX(120),
                  ),
                ),
              ),
              Container(
                child: Column(
                  children: <Widget>[
                    Container(
                      padding: EdgeInsets.only(
                          left: Fit.scaleX(40),
                          top: Fit.scaleX(80)),
                      width: Fit.scaleX(650),
                      child: Text(
                        bean.Remark,
                        textAlign: TextAlign.center,
                        style: new TextStyle(
                            inherit: false,
                            color: Color(0xFFFFFFFF),
                            fontWeight:FontWeight.w900,
                            letterSpacing:10.0,
                            fontSize: Fit.scaleTextSize(48),
                            fontStyle: FontStyle.italic),
                      ),
                    ),

                    Container(
                      padding: EdgeInsets.only(
                          left: Fit.scaleX(50),
                          top: Fit.scaleX(40)),
                      width: Fit.scaleX(650),
                      child: Text(
                        CustomLocalizations.instance.getString(StringIds.time)+': ${bean.WorkingTime} '+CustomLocalizations.instance.getString(StringIds.minutes),
                        textAlign: TextAlign.center,
                        style: new TextStyle(
                            inherit: false,
                            color: Color(0xFFFFFFFF),
                            fontSize: Fit.scaleTextSize(36),
                            fontStyle: FontStyle.normal),
                      ),
                    ),
                    Container(
                      padding: EdgeInsets.only(
                          left: Fit.scaleX(50),
                          top: Fit.scaleX(40)),
                      width: Fit.scaleX(650),
                      child: Text(
                        CustomLocalizations.instance.getString(StringIds.billing)+': ${bean.NormalPrice}',
                        textAlign: TextAlign.center,
                        style: new TextStyle(
                            inherit: false,
                            color: Color(0xFFFFFFFF),
                            fontSize: Fit.scaleTextSize(36),
                            fontStyle: FontStyle.normal),
                      ),
                    )


                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );

  }
}
